package com.qingdai.addresscenter.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
//@OpenAPIDefinition(info =
//@io.swagger.v3.oas.annotations.info.Info(title = "Swagger3.0构建API文档", version = "1.0", description = "Swagger3.0构建API文档 v1.0")
//)
public class OpenApiConfig {
    @Bean
    public OpenAPI openApi() {
        return new OpenAPI()
//                .apis(RequestHandlerSelectors.basePackage("com.turkeymz.baseboot.controller"))
                .info(new Info()
                        .title("青黛-后端文档")
                        .description("青黛")
                        .contact(new Contact().name("LiuZiMing").email("3335308825@qq.com").url("https://gitee.com/liuziming33"))
                        .version("v1.0"));
    }
//    @Bean
//    public GroupedOpenApi restApi() {
//        return GroupedOpenApi.builder()
//                .group("rest-api")
//                .pathsToMatch("/rest/**")
//                .build();
//    }
//
//    @Bean
//    public GroupedOpenApi helloApi() {
//        return GroupedOpenApi.builder()
//                .group("hello")
//                .pathsToMatch("/hello/**")
//                .build();
//    }

}
